<%= render :partial => "/tr8n/admin/common/header" %>
<%= render :partial => "tabs" %>
<%= tr8n_will_filter(@messages) %>

<%= form_tag("", :id => "topics_form") do %>
  <%= hidden_field_tag(:type, "message") %>
  <%= will_filter_table_tag(@messages, :columns => [
    [:icn, image_tag("tr8n/icons/comment.png"), :title => "", :style => "width:12px;"],
    [:checkbox, :ids],
    :created_at,
    [:language_id, lambda{|message|
      if message.language
        link_to(message.language.english_name, :controller => "/tr8n/admin/language", :action => :view, :lang_id => message.language.id)
      else
         "Deleted Language"    
      end  
    }, :filterable => true], 

    [:translator_id, lambda{|message|
      if message.translator
        link_to(message.translator.name, :controller => "/tr8n/admin/translator", :action => :view, :translator_id => message.translator.id) 
      else
         "Deleted Translator"    
      end  
    }, :filterable => true], 
    
    [:language_forum_topic_id, :filterable => true], 

    :message,

    [:actions, lambda{|message|
      tr8n_actions_tag([
        link_to_function("Delete", "deleteObjects('#{message.id}')")
      ])
    }, 'white-space: nowrap'] 
  ]) %>

<% end %>


<%= will_filter_actions_bar_tag(@messages, [
  ['Delete Selected Messages', 'deleteObjects()'] 
]) %>

<%= render :partial => "/tr8n/admin/common/footer" %>
